﻿using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Text;
using Tdb.YY.Helper.Config;
using Tdb.YY.Model;

namespace Tdb.YY.EncryptTool
{
    /// <summary>
    /// 数据库上下文
    /// </summary>
    public class YY1Context : DbContext
    {
        #region 表

        /// <summary>
        /// YY1表
        /// </summary>
        public DbSet<YY1> YY1s { get; set; }

        #endregion

        /// <summary>
        /// 配置
        /// </summary>
        /// <param name="optionsBuilder"></param>
        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        {
            optionsBuilder.UseMySql("server=127.0.0.1;database=YY1;user id=root;password=t1234567890");//配置连接字符串
            base.OnConfiguring(optionsBuilder);
        }
    }
}
